I opened up my my zombie game and I'm going to import my message queue into my zombie game.
Let's go to the toolbox because we saved it off under my model's right inventory my models.
I'll click on message queue.
Yep.
Warns me that there's three scripts in there and it's in the workspace.
That's all right.
I'm going to open this up.
Let me get my message script.
I'm going to drag it down into the starter g UI on the screen.
G UI.
There we go.
And then I need my info message Ray that's going to go in replicated storage.
Let's just drag that in there and then we're going to get our info message label that's also going to
go in a replicated storage.
I'm not going to use the message generator.
We can go ahead and delete the model because I got what I wanted from it and now I want to go to my.
Server script service.
Open up the game manager and then let's make some calls to our message queue.
Now, remember, we need to get that remote event, so I'll do a replicated storage variable here.
Game, get service replicated storage.
Then I'll do another variable for info info message.
Oh my gosh.
Ah, a replicated storage.
Wait for child info message Ray.
And let's go down to our check daily streak.
That's where the magic happens.
Right here we increase our shrink.
So I'm going to fire a remote event, so it'll go in our queue and then we'll get some sort of message.
Let's do info message re colon by our client to the player.
And then here's our message.
It'll be you in creased your streak and then maybe we'll give them some money to info message re via
client player.
You get 100 points.
Cool and then they also have a daily reward.
Right?
Because this is the first time they logged in just for the day.
Let's do an info message re fire client
player.
You get a daily.
Reward.
Whoo!
That was kind of tough.
I will give them 50 points for that.
I'm just going to copy this.
Control C.
Control V, 50 points.
And then we'll go ahead and give the points to our player.
Player.
Here we go.
And we have leader stats on the leader.
Stats points dot value.
Don't forget the value.
We're going to do a plus equals and that'll be total 150.
Nice.
Now.
If we break our streak, it's still going to be a new day.
So let's copy these.
You get a daily reward.
Let's go down here.
They blew the streak.
BOMBER Oh, we'll put that in there, too.
Well, let's face this.
For the daily reward.
Daily reward?
That's good.
This is too much, right?
They don't get the.
They don't get the hundred.
And then let's give them a message for the Daily Streak.
The bad news.
Info Message.
Re Fire Client player.
You ruined.
You broke your streak.
Broke your streak.
Bow back to one.
Oh, and let's write what our streak is.
It says you increased your streak, but I can give the value.
Let's go ahead and put a space in there.
String concatenate, and then I'm going to get my player info.
Street Value Control C Control V.
I think I'll put this in the next line though.
There you go.
You can keep it all in one line.
I just want you to be able to see it.
All right.
So that's one whole parameter as a string going over.
I just use string concatenate for let's.
I've been playing this today, so let's force a day or all over.
Let's go down to initialize player data and right where we have our saved time, let's do a minus.
86,400.
So that's going to push us back a day.
Hit the play button, go to view, go to output so we can look for errors.
Oh, you increased your streak seven days.
You get 100 points.
You get a daily reward.
You get 50 points, that's kind of cool.
Now, the only thing is it gives the points right away.
But you can play with this now that you know how to do client server stuff.
And when we're doing our store, we're going to go from client to server.
We're going we've been going server to client recently.
Well, we've only gone server to client, I believe, but we're going to change that pretty soon.
I will see you in the next video.